﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace AQMProject
{
    class BankDAO
    {

        public void Insert()
        {

        }
    
        public void Update()
        {
        }
        
        public void Delete()
        {

        }

        public List<bankerkennung> SelectBankmatching()
        {
            using (AQMDataDataContext db = new AQMDataDataContext())
            {
                List<bankerkennung> data = (from c in db.bankerkennung
                                            select c).ToList();
                return data;
            }
        }


        public List<bank> Select()
        {
            using (AQMDataDataContext db = new AQMDataDataContext())
            {
                List<bank> data = (from c in db.bank
                                   select c).ToList();
                return data;
            }
        }

        public List<bank> SelectBankByName(String l_bankname)
        {
            using (AQMDataDataContext db = new AQMDataDataContext())
            {
                List<bank> data = (from c in db.bank
                                   where c.bankname == l_bankname
                                   select c).ToList();
                return data;
            }
        }

        public List<bank> SelectBankById(int l_bankid)
        {
            using (AQMDataDataContext db = new AQMDataDataContext())
            {
                List<bank> data = (from c in db.bank
                                   where c.IdBank == l_bankid
                                   select c).ToList();
                return data;
            }
        }

        public void Count()
        {
        }
    }
}
